import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/major_hazard/hazard_equip_entity.dart';

HazardEquipEntity $HazardEquipEntityFromJson(Map<String, dynamic> json) {
  final HazardEquipEntity hazardEquipEntity = HazardEquipEntity();
  final String? backupLinkAddress = jsonConvert.convert<String>(json['backupLinkAddress']);
  if (backupLinkAddress != null) {
    hazardEquipEntity.backupLinkAddress = backupLinkAddress;
  }
  final String? buildDate = jsonConvert.convert<String>(json['buildDate']);
  if (buildDate != null) {
    hazardEquipEntity.buildDate = buildDate;
  }
  final String? bypassSwitchTotalLocaleNo = jsonConvert.convert<String>(json['bypassSwitchTotalLocaleNo']);
  if (bypassSwitchTotalLocaleNo != null) {
    hazardEquipEntity.bypassSwitchTotalLocaleNo = bypassSwitchTotalLocaleNo;
  }
  final String? chemicalProcessType = jsonConvert.convert<String>(json['chemicalProcessType']);
  if (chemicalProcessType != null) {
    hazardEquipEntity.chemicalProcessType = chemicalProcessType;
  }
  final String? chemicalProcessTypeDicId = jsonConvert.convert<String>(json['chemicalProcessTypeDicId']);
  if (chemicalProcessTypeDicId != null) {
    hazardEquipEntity.chemicalProcessTypeDicId = chemicalProcessTypeDicId;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    hazardEquipEntity.companyCode = companyCode;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    hazardEquipEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    hazardEquipEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    hazardEquipEntity.createDate = createDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    hazardEquipEntity.deleted = deleted;
  }
  final int? designReserve = jsonConvert.convert<int>(json['designReserve']);
  if (designReserve != null) {
    hazardEquipEntity.designReserve = designReserve;
  }
  final String? equipCode = jsonConvert.convert<String>(json['equipCode']);
  if (equipCode != null) {
    hazardEquipEntity.equipCode = equipCode;
  }
  final String? equipDescribe = jsonConvert.convert<String>(json['equipDescribe']);
  if (equipDescribe != null) {
    hazardEquipEntity.equipDescribe = equipDescribe;
  }
  final String? equipName = jsonConvert.convert<String>(json['equipName']);
  if (equipName != null) {
    hazardEquipEntity.equipName = equipName;
  }
  final String? equipStatus = jsonConvert.convert<String>(json['equipStatus']);
  if (equipStatus != null) {
    hazardEquipEntity.equipStatus = equipStatus;
  }
  final String? equipType = jsonConvert.convert<String>(json['equipType']);
  if (equipType != null) {
    hazardEquipEntity.equipType = equipType;
  }
  final String? equipTypeDicId = jsonConvert.convert<String>(json['equipTypeDicId']);
  if (equipTypeDicId != null) {
    hazardEquipEntity.equipTypeDicId = equipTypeDicId;
  }
  final int? floorArea = jsonConvert.convert<int>(json['floorArea']);
  if (floorArea != null) {
    hazardEquipEntity.floorArea = floorArea;
  }
  final String? hazardCode = jsonConvert.convert<String>(json['hazardCode']);
  if (hazardCode != null) {
    hazardEquipEntity.hazardCode = hazardCode;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    hazardEquipEntity.id = id;
  }
  final int? interlockingCount = jsonConvert.convert<int>(json['interlockingCount']);
  if (interlockingCount != null) {
    hazardEquipEntity.interlockingCount = interlockingCount;
  }
  final int? latitude = jsonConvert.convert<int>(json['latitude']);
  if (latitude != null) {
    hazardEquipEntity.latitude = latitude;
  }
  final int? liquidLevel = jsonConvert.convert<int>(json['liquidLevel']);
  if (liquidLevel != null) {
    hazardEquipEntity.liquidLevel = liquidLevel;
  }
  final int? longitude = jsonConvert.convert<int>(json['longitude']);
  if (longitude != null) {
    hazardEquipEntity.longitude = longitude;
  }
  final String? mainSwitchStatusLocaleNo = jsonConvert.convert<String>(json['mainSwitchStatusLocaleNo']);
  if (mainSwitchStatusLocaleNo != null) {
    hazardEquipEntity.mainSwitchStatusLocaleNo = mainSwitchStatusLocaleNo;
  }
  final String? maintenanceDate = jsonConvert.convert<String>(json['maintenanceDate']);
  if (maintenanceDate != null) {
    hazardEquipEntity.maintenanceDate = maintenanceDate;
  }
  final String? manLinkAddress = jsonConvert.convert<String>(json['manLinkAddress']);
  if (manLinkAddress != null) {
    hazardEquipEntity.manLinkAddress = manLinkAddress;
  }
  final String? medium = jsonConvert.convert<String>(json['medium']);
  if (medium != null) {
    hazardEquipEntity.medium = medium;
  }
  final String? mediumStatus = jsonConvert.convert<String>(json['mediumStatus']);
  if (mediumStatus != null) {
    hazardEquipEntity.mediumStatus = mediumStatus;
  }
  final String? mediumStatusDicId = jsonConvert.convert<String>(json['mediumStatusDicId']);
  if (mediumStatusDicId != null) {
    hazardEquipEntity.mediumStatusDicId = mediumStatusDicId;
  }
  final String? monitorGas = jsonConvert.convert<String>(json['monitorGas']);
  if (monitorGas != null) {
    hazardEquipEntity.monitorGas = monitorGas;
  }
  final String? monitorType = jsonConvert.convert<String>(json['monitorType']);
  if (monitorType != null) {
    hazardEquipEntity.monitorType = monitorType;
  }
  final String? monitorTypeDicId = jsonConvert.convert<String>(json['monitorTypeDicId']);
  if (monitorTypeDicId != null) {
    hazardEquipEntity.monitorTypeDicId = monitorTypeDicId;
  }
  final String? parameterDesc = jsonConvert.convert<String>(json['parameterDesc']);
  if (parameterDesc != null) {
    hazardEquipEntity.parameterDesc = parameterDesc;
  }
  final int? pressureDesign = jsonConvert.convert<int>(json['pressureDesign']);
  if (pressureDesign != null) {
    hazardEquipEntity.pressureDesign = pressureDesign;
  }
  final int? pressureMax = jsonConvert.convert<int>(json['pressureMax']);
  if (pressureMax != null) {
    hazardEquipEntity.pressureMax = pressureMax;
  }
  final String? pressureType = jsonConvert.convert<String>(json['pressureType']);
  if (pressureType != null) {
    hazardEquipEntity.pressureType = pressureType;
  }
  final String? pressureTypeDicId = jsonConvert.convert<String>(json['pressureTypeDicId']);
  if (pressureTypeDicId != null) {
    hazardEquipEntity.pressureTypeDicId = pressureTypeDicId;
  }
  final String? ptInfo = jsonConvert.convert<String>(json['ptInfo']);
  if (ptInfo != null) {
    hazardEquipEntity.ptInfo = ptInfo;
  }
  final int? rangeDown = jsonConvert.convert<int>(json['rangeDown']);
  if (rangeDown != null) {
    hazardEquipEntity.rangeDown = rangeDown;
  }
  final int? rangeUp = jsonConvert.convert<int>(json['rangeUp']);
  if (rangeUp != null) {
    hazardEquipEntity.rangeUp = rangeUp;
  }
  final int? reserves = jsonConvert.convert<int>(json['reserves']);
  if (reserves != null) {
    hazardEquipEntity.reserves = reserves;
  }
  final String? riskObjectId = jsonConvert.convert<String>(json['riskObjectId']);
  if (riskObjectId != null) {
    hazardEquipEntity.riskObjectId = riskObjectId;
  }
  final String? startDate = jsonConvert.convert<String>(json['startDate']);
  if (startDate != null) {
    hazardEquipEntity.startDate = startDate;
  }
  final String? storeType = jsonConvert.convert<String>(json['storeType']);
  if (storeType != null) {
    hazardEquipEntity.storeType = storeType;
  }
  final String? storeTypeDicId = jsonConvert.convert<String>(json['storeTypeDicId']);
  if (storeTypeDicId != null) {
    hazardEquipEntity.storeTypeDicId = storeTypeDicId;
  }
  final String? tankType = jsonConvert.convert<String>(json['tankType']);
  if (tankType != null) {
    hazardEquipEntity.tankType = tankType;
  }
  final String? tankTypeDicId = jsonConvert.convert<String>(json['tankTypeDicId']);
  if (tankTypeDicId != null) {
    hazardEquipEntity.tankTypeDicId = tankTypeDicId;
  }
  final String? targetCode = jsonConvert.convert<String>(json['targetCode']);
  if (targetCode != null) {
    hazardEquipEntity.targetCode = targetCode;
  }
  final String? targetName = jsonConvert.convert<String>(json['targetName']);
  if (targetName != null) {
    hazardEquipEntity.targetName = targetName;
  }
  final String? targetType = jsonConvert.convert<String>(json['targetType']);
  if (targetType != null) {
    hazardEquipEntity.targetType = targetType;
  }
  final int? temperatureMax = jsonConvert.convert<int>(json['temperatureMax']);
  if (temperatureMax != null) {
    hazardEquipEntity.temperatureMax = temperatureMax;
  }
  final int? temperatureMin = jsonConvert.convert<int>(json['temperatureMin']);
  if (temperatureMin != null) {
    hazardEquipEntity.temperatureMin = temperatureMin;
  }
  final String? temperatureType = jsonConvert.convert<String>(json['temperatureType']);
  if (temperatureType != null) {
    hazardEquipEntity.temperatureType = temperatureType;
  }
  final String? temperatureTypeDicId = jsonConvert.convert<String>(json['temperatureTypeDicId']);
  if (temperatureTypeDicId != null) {
    hazardEquipEntity.temperatureTypeDicId = temperatureTypeDicId;
  }
  final int? thresholdDown = jsonConvert.convert<int>(json['thresholdDown']);
  if (thresholdDown != null) {
    hazardEquipEntity.thresholdDown = thresholdDown;
  }
  final int? thresholdDown2 = jsonConvert.convert<int>(json['thresholdDown2']);
  if (thresholdDown2 != null) {
    hazardEquipEntity.thresholdDown2 = thresholdDown2;
  }
  final int? thresholdUp = jsonConvert.convert<int>(json['thresholdUp']);
  if (thresholdUp != null) {
    hazardEquipEntity.thresholdUp = thresholdUp;
  }
  final int? thresholdUp2 = jsonConvert.convert<int>(json['thresholdUp2']);
  if (thresholdUp2 != null) {
    hazardEquipEntity.thresholdUp2 = thresholdUp2;
  }
  final String? unit = jsonConvert.convert<String>(json['unit']);
  if (unit != null) {
    hazardEquipEntity.unit = unit;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    hazardEquipEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    hazardEquipEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    hazardEquipEntity.updateDate = updateDate;
  }
  final String? useDate = jsonConvert.convert<String>(json['useDate']);
  if (useDate != null) {
    hazardEquipEntity.useDate = useDate;
  }
  return hazardEquipEntity;
}

Map<String, dynamic> $HazardEquipEntityToJson(HazardEquipEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['backupLinkAddress'] = entity.backupLinkAddress;
  data['buildDate'] = entity.buildDate;
  data['bypassSwitchTotalLocaleNo'] = entity.bypassSwitchTotalLocaleNo;
  data['chemicalProcessType'] = entity.chemicalProcessType;
  data['chemicalProcessTypeDicId'] = entity.chemicalProcessTypeDicId;
  data['companyCode'] = entity.companyCode;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deleted'] = entity.deleted;
  data['designReserve'] = entity.designReserve;
  data['equipCode'] = entity.equipCode;
  data['equipDescribe'] = entity.equipDescribe;
  data['equipName'] = entity.equipName;
  data['equipStatus'] = entity.equipStatus;
  data['equipType'] = entity.equipType;
  data['equipTypeDicId'] = entity.equipTypeDicId;
  data['floorArea'] = entity.floorArea;
  data['hazardCode'] = entity.hazardCode;
  data['id'] = entity.id;
  data['interlockingCount'] = entity.interlockingCount;
  data['latitude'] = entity.latitude;
  data['liquidLevel'] = entity.liquidLevel;
  data['longitude'] = entity.longitude;
  data['mainSwitchStatusLocaleNo'] = entity.mainSwitchStatusLocaleNo;
  data['maintenanceDate'] = entity.maintenanceDate;
  data['manLinkAddress'] = entity.manLinkAddress;
  data['medium'] = entity.medium;
  data['mediumStatus'] = entity.mediumStatus;
  data['mediumStatusDicId'] = entity.mediumStatusDicId;
  data['monitorGas'] = entity.monitorGas;
  data['monitorType'] = entity.monitorType;
  data['monitorTypeDicId'] = entity.monitorTypeDicId;
  data['parameterDesc'] = entity.parameterDesc;
  data['pressureDesign'] = entity.pressureDesign;
  data['pressureMax'] = entity.pressureMax;
  data['pressureType'] = entity.pressureType;
  data['pressureTypeDicId'] = entity.pressureTypeDicId;
  data['ptInfo'] = entity.ptInfo;
  data['rangeDown'] = entity.rangeDown;
  data['rangeUp'] = entity.rangeUp;
  data['reserves'] = entity.reserves;
  data['riskObjectId'] = entity.riskObjectId;
  data['startDate'] = entity.startDate;
  data['storeType'] = entity.storeType;
  data['storeTypeDicId'] = entity.storeTypeDicId;
  data['tankType'] = entity.tankType;
  data['tankTypeDicId'] = entity.tankTypeDicId;
  data['targetCode'] = entity.targetCode;
  data['targetName'] = entity.targetName;
  data['targetType'] = entity.targetType;
  data['temperatureMax'] = entity.temperatureMax;
  data['temperatureMin'] = entity.temperatureMin;
  data['temperatureType'] = entity.temperatureType;
  data['temperatureTypeDicId'] = entity.temperatureTypeDicId;
  data['thresholdDown'] = entity.thresholdDown;
  data['thresholdDown2'] = entity.thresholdDown2;
  data['thresholdUp'] = entity.thresholdUp;
  data['thresholdUp2'] = entity.thresholdUp2;
  data['unit'] = entity.unit;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  data['useDate'] = entity.useDate;
  return data;
}

extension HazardEquipEntityExtension on HazardEquipEntity {
  HazardEquipEntity copyWith({
    String? backupLinkAddress,
    String? buildDate,
    String? bypassSwitchTotalLocaleNo,
    String? chemicalProcessType,
    String? chemicalProcessTypeDicId,
    String? companyCode,
    String? createBy,
    String? createById,
    String? createDate,
    String? deleted,
    int? designReserve,
    String? equipCode,
    String? equipDescribe,
    String? equipName,
    String? equipStatus,
    String? equipType,
    String? equipTypeDicId,
    int? floorArea,
    String? hazardCode,
    String? id,
    int? interlockingCount,
    int? latitude,
    int? liquidLevel,
    int? longitude,
    String? mainSwitchStatusLocaleNo,
    String? maintenanceDate,
    String? manLinkAddress,
    String? medium,
    String? mediumStatus,
    String? mediumStatusDicId,
    String? monitorGas,
    String? monitorType,
    String? monitorTypeDicId,
    String? parameterDesc,
    int? pressureDesign,
    int? pressureMax,
    String? pressureType,
    String? pressureTypeDicId,
    String? ptInfo,
    int? rangeDown,
    int? rangeUp,
    int? reserves,
    String? riskObjectId,
    String? startDate,
    String? storeType,
    String? storeTypeDicId,
    String? tankType,
    String? tankTypeDicId,
    String? targetCode,
    String? targetName,
    String? targetType,
    int? temperatureMax,
    int? temperatureMin,
    String? temperatureType,
    String? temperatureTypeDicId,
    int? thresholdDown,
    int? thresholdDown2,
    int? thresholdUp,
    int? thresholdUp2,
    String? unit,
    String? updateBy,
    String? updateById,
    String? updateDate,
    String? useDate,
  }) {
    return HazardEquipEntity()
      ..backupLinkAddress = backupLinkAddress ?? this.backupLinkAddress
      ..buildDate = buildDate ?? this.buildDate
      ..bypassSwitchTotalLocaleNo = bypassSwitchTotalLocaleNo ?? this.bypassSwitchTotalLocaleNo
      ..chemicalProcessType = chemicalProcessType ?? this.chemicalProcessType
      ..chemicalProcessTypeDicId = chemicalProcessTypeDicId ?? this.chemicalProcessTypeDicId
      ..companyCode = companyCode ?? this.companyCode
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deleted = deleted ?? this.deleted
      ..designReserve = designReserve ?? this.designReserve
      ..equipCode = equipCode ?? this.equipCode
      ..equipDescribe = equipDescribe ?? this.equipDescribe
      ..equipName = equipName ?? this.equipName
      ..equipStatus = equipStatus ?? this.equipStatus
      ..equipType = equipType ?? this.equipType
      ..equipTypeDicId = equipTypeDicId ?? this.equipTypeDicId
      ..floorArea = floorArea ?? this.floorArea
      ..hazardCode = hazardCode ?? this.hazardCode
      ..id = id ?? this.id
      ..interlockingCount = interlockingCount ?? this.interlockingCount
      ..latitude = latitude ?? this.latitude
      ..liquidLevel = liquidLevel ?? this.liquidLevel
      ..longitude = longitude ?? this.longitude
      ..mainSwitchStatusLocaleNo = mainSwitchStatusLocaleNo ?? this.mainSwitchStatusLocaleNo
      ..maintenanceDate = maintenanceDate ?? this.maintenanceDate
      ..manLinkAddress = manLinkAddress ?? this.manLinkAddress
      ..medium = medium ?? this.medium
      ..mediumStatus = mediumStatus ?? this.mediumStatus
      ..mediumStatusDicId = mediumStatusDicId ?? this.mediumStatusDicId
      ..monitorGas = monitorGas ?? this.monitorGas
      ..monitorType = monitorType ?? this.monitorType
      ..monitorTypeDicId = monitorTypeDicId ?? this.monitorTypeDicId
      ..parameterDesc = parameterDesc ?? this.parameterDesc
      ..pressureDesign = pressureDesign ?? this.pressureDesign
      ..pressureMax = pressureMax ?? this.pressureMax
      ..pressureType = pressureType ?? this.pressureType
      ..pressureTypeDicId = pressureTypeDicId ?? this.pressureTypeDicId
      ..ptInfo = ptInfo ?? this.ptInfo
      ..rangeDown = rangeDown ?? this.rangeDown
      ..rangeUp = rangeUp ?? this.rangeUp
      ..reserves = reserves ?? this.reserves
      ..riskObjectId = riskObjectId ?? this.riskObjectId
      ..startDate = startDate ?? this.startDate
      ..storeType = storeType ?? this.storeType
      ..storeTypeDicId = storeTypeDicId ?? this.storeTypeDicId
      ..tankType = tankType ?? this.tankType
      ..tankTypeDicId = tankTypeDicId ?? this.tankTypeDicId
      ..targetCode = targetCode ?? this.targetCode
      ..targetName = targetName ?? this.targetName
      ..targetType = targetType ?? this.targetType
      ..temperatureMax = temperatureMax ?? this.temperatureMax
      ..temperatureMin = temperatureMin ?? this.temperatureMin
      ..temperatureType = temperatureType ?? this.temperatureType
      ..temperatureTypeDicId = temperatureTypeDicId ?? this.temperatureTypeDicId
      ..thresholdDown = thresholdDown ?? this.thresholdDown
      ..thresholdDown2 = thresholdDown2 ?? this.thresholdDown2
      ..thresholdUp = thresholdUp ?? this.thresholdUp
      ..thresholdUp2 = thresholdUp2 ?? this.thresholdUp2
      ..unit = unit ?? this.unit
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate
      ..useDate = useDate ?? this.useDate;
  }
}
